<template>
  <div ref="dom" style="width: 100%; height: 100%"></div>
</template>

<script setup lang="ts">
  /**
   * @description 公用组件--图表
   */
  import { ref, onMounted } from "vue";
  const props = defineProps(["spec", "item"]);
  import VChart from "@visactor/vchart";
  const dom = ref<HTMLElement>();

  onMounted(() => {
    const vchart = new VChart(props.spec, { dom: dom.value });
    vchart.renderSync();
  });
</script>

<style scoped lang="scss"></style>
